//
//  ACWBillListVC.m
//  aichewang
//
//  Created by ucs on 16/2/25.
//  Copyright © 2016年 aichewang. All rights reserved.
//

#import "ACWBillListVC.h"

@interface ACWBillListVC ()

@end

@implementation ACWBillListVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.autoHiddenKeyBoardEnable = YES;
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(KeyboardShowUp:) name:UIKeyboardDidShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(KeyboardDismiss:) name:UIKeyboardWillHideNotification object:nil];
}




- (void)KeyboardShowUp:(NSNotification *)notification {
    CGFloat kbHeight = [[notification.userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size.height;
    if (self.view.y == 0) {
        [UIView animateWithDuration:0.25 delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{
            self.view.y -= kbHeight;
        } completion:nil];
    }
}

- (void)KeyboardDismiss:(NSNotification *)notification {
    [UIView animateWithDuration:0.25 delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{
        self.view.y = 0;
    } completion:nil];
}

@end
